The present invention relates generally to computer systems. More particularly, the invention relates to a mechanism that guarantees completions of transactions in all flow control classes.
A current design in most computer systems is to use transactions as a means to communicate between the various devices in the computer system. For example, a processor can initiate a programmed I/O (xe2x80x9cPIOxe2x80x9d) transaction in order to read an I/O device""s internal register. A direct memory access (xe2x80x9cDMAxe2x80x9d) read transaction is used by an I/O device to read data from main memory. In order to transmit the transactions to their intended destination in an efficient manner, the transactions are classified in accordance with a flow control class. Transactions that belong to the same flow control class typically share a common FIFO. A transaction is grouped into a particular flow control class in order to ensure that there are no circular dependencies between the classes since a circular dependency may cause a deadlock.
At times, there is a need to take a checkpoint or to shot down an application. In order to perform these tasks, all the outstanding transactions need to complete or arrive at their intended destinations. Often, the application will wait a predetermined amount of time that is intended to be long enough for all the transactions to complete. However, a situation may arise where a transaction takes longer than expected and does not complete before the checkpoint occurs or the application terminates. As such, this method cannot ensure that all transactions have completed. Accordingly, there is a need to overcome this shortcoming.
In summary, the technology of the present invention pertains to a plunge transaction that allows all flow control class transactions to complete when so requested. A number of transaction completer units are provided in those units that process transaction activity. In an embodiment of the present invention, there is an I/O transaction completer unit, a cache unit transaction completer unit, and an I/O link transaction completer unit. The I/O transaction completer unit handles the flow control class of transactions that interact with I/O devices. The cache unit transaction completer unit handles the flow control class of transactions that are used by the cache unit and those that are transmitted to an external memory controller unit. As such, the I/O transaction and cache unit transaction completer units insert a plunge transaction into their respective outbound transaction queues. The I/O link transaction completer unit is the recipient of the plunge transactions and when it receives a plunge transaction for each flow control class then all the pending transactions have completed.
The cache transaction completer unit has a register that a coordinator processor can write to in order to initiate the plunge process which is in response to a directive from the software. The register has a bit representing each flow control class of transactions and when a particular bit is set, the cache transaction completer unit initiates the requisite activity to insert the appropriate plunge transaction in the transaction queue of the requested flow control class whenever the unit has the opportunity.
The I/O link transaction completer unit receives the plunge transaction and tracks the completion of that particular flow control class of transactions. When the I/O link transaction completer unit receives a plunge transaction for each flow control class then all the pending transactions have completed.
This mechanism does not cause a deadlock since the plunge transaction is inserted into each flow control class and follows the normal flow of a transaction without creating any new dependencies between flow control classes.